using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication2.Models.Mapping
{
    public class rp_PaymentsMap : EntityTypeConfiguration<rp_Payments>
    {
        public rp_PaymentsMap()
        {
            // Primary Key
            this.HasKey(t => t.id);

            // Properties
            this.Property(t => t.BillNumber)
                .HasMaxLength(50);

            // Table & Column Mappings
            this.ToTable("rp_Payments");
            this.Property(t => t.id).HasColumnName("id");
            this.Property(t => t.BillNumber).HasColumnName("BillNumber");
            this.Property(t => t.PaymentID).HasColumnName("PaymentID");
            this.Property(t => t.Amount).HasColumnName("Amount");
            this.Property(t => t.BillAmount).HasColumnName("BillAmount");
            this.Property(t => t.BillBalanceBefore).HasColumnName("BillBalanceBefore");
            this.Property(t => t.BillBalanceAfter).HasColumnName("BillBalanceAfter");
        }
    }
}
